package com.cloudbroker.bcs.platform.ltb.middle.service.impl;

import com.alibaba.fastjson.JSON;
import com.cloudbroker.bcs.common.dao.base.DAOBase;
import com.cloudbroker.bcs.platform.ltb.middle.dao.InviteLogDAO;
import com.cloudbroker.bcs.platform.ltb.middle.entity.InviteLog;
import com.cloudbroker.bcs.platform.ltb.middle.service.InviteLogService;
import com.cloudbroker.bcs.platform.ltb.middle.service.base.TenantServiceImplBase;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
import java.util.Map;

/**
 * Created by lili19289 on 2016/11/24.
 */
@Service
public class InviteLogServiceimpl extends TenantServiceImplBase implements InviteLogService{

    @Resource
    private InviteLogDAO inviteLogDAO;

    @Override
    protected DAOBase getDAO() {
        return inviteLogDAO;
    }

    public List<Map> fetchInviteLogs(Map<String,Object> paramMap){
        List<Map> listMap = inviteLogDAO.fetchByInviterId(paramMap);
        if(listMap==null)
            return Collections.emptyList();
        return listMap;
    }

    public int count(Map<String,Object> paramMap){
        return inviteLogDAO.count(paramMap);
    }
}
